import com.alibaba.fastjson.JSON;
import org.junit.Test;
import pojo.User;

public class Jsontest1 {
    @Test
    public void m1(){
        User user = new User("a","d");
        String userJson = JSON.toJSONString(user);
        System.out.println(userJson);
        User user1 = JSON.parseObject(userJson,User.class);
        System.out.println(user1);


    }
}
